conc(A,B,C):-A=[], C=B.
conc(A,B,C):-A=[X|D],conc(D,B,E),C=[X|E].
	
conc2([],B,B).
conc2([X|D],B,[X|E]):-conc2(D,B,E).

conc(X,Y,Z).

pertenece(X,[X,L]).
pertenece(X,[Y|L]):-pertenece(X,L).

pert2(X,[X|_]).
pert2(X,[_,L]):-pert2(X,L).

pert3(X,[Y|L]):-X=Y ; pert3(X,L).

